import { AppRouteRecordRaw } from '@/types/route'
import { shallowRef } from 'vue'
import Layout from '@/layout/index.vue'

export let goodsRouter: AppRouteRecordRaw = {
  path: '/goods',
  name: 'goods',
  component: shallowRef(Layout),
  meta: {
    title: '商品中心',
    icon: 'icon-shangpinzhongxin_icon'
  },
  children: [
    {
      path: '/goods/manage',
      component: () => import(/* webpackChunkName: "goods" */ '@/views/goods/product/goodsManage.vue'),
      name: 'goodsManage',
      meta: { title: '商品管理' }
    },
    {
      path: '/goods/package',
      component: () => import(/* webpackChunkName: "goods" */ '@/views/goods/package/packageManage.vue'),
      name: 'packageManage',
      meta: { title: '套餐管理' }
    },
    {
      path: '/goods/order',
      component: () => import(/* webpackChunkName: "goods" */ '@/views/goods/order/orderManage.vue'),
      name: 'orderManage',
      meta: { title: '订单管理' }
    }
  ]
}

export default goodsRouter
